local Action_PlayerExit = 
{
	PlayerKey = 0;
}


function Action_PlayerExit:Execute()
	print(string.format("Action_PlayerExit:Execute PlayerKey[%d]",self.PlayerKey));
    -- 玩家退出，直接判断他g了
    local PlayerInfo = UGCGameSystem.GameState:GetPlayerInfoWithPlayerKey(self.PlayerKey)
    if PlayerInfo ~= nil then
       PlayerInfo.EndGame = true
    end

	local PlayerList = UGCGameSystem.GetAllPlayerController()
	local Count = #PlayerList
	if Count == 0 then
		if self.AllPlayersLeaveNotifyEvent ~= "" then 
			
			LuaQuickFireEvent("GameFinished", self); 
		end
	end

	return true;
end


return Action_PlayerExit